package elementui.form;


import java.util.Random;
import java.util.UUID;

public class Input extends  FormItem {
    String html;
    String placeholder ;

    String icon;
    boolean ispassword = false;
    boolean disabled =false;
    String script;
    public Input()
    {
        uuid = UUID.randomUUID().toString();
    }

    public String getDefaultHmtl()
    {
        html = "<el-input\n" +
                "    placeholder=\""+getPlaceholder()+"\"\n" +
                "    suffix-icon=\""+getIcon()+"\"\n" +
                "    v-model=\""+getVmode()+"\">\n" +
                (disabled ? ":disabled=\"true\"":"" )  +
                (ispassword?"show-password":"")+
                "  </el-input>";

        return html;
    }

    public String getDefaultScript()
    {
        return null;
    }

//    @Override
//    String getData() {
//        return " input: ''";
//    }

    public String getScript() {
        return script;
    }

    public void setScript(String script) {
        this.script = script;
    }

    public String getPlaceholder() {
        return placeholder;
    }

    public void setPlaceholder(String placeholder) {
        this.placeholder = placeholder;
    }





    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getHtml() {
        return html;
    }

    public void setHtml(String html) {
        this.html = html;
    }
}
